//用于测试的api
import request from '@/utils/httpRequest/request'

const api = {
    comment: '/api/comment/one',
    reply: '/api/comment/replyToComment',
    show: '/api/comment/ofAnArticle',
}

export const comment = {
    comment: function(content,userId,passageId) {
        return request({
            url: api.comment,
            method: 'post',
            data: {
                content:content,
                userId:userId,
                passageId:passageId
            }
        })
    },
    reply: function(content, userId, commentId) {
        return request({
            url: api.reply,
            method: 'post',
            data: {
                content:content,
                userId:userId,
                commentId:commentId
            }
        })
    },
    show: function(id) {
        return request({
            url: api.show,
            method: 'post',
            data: {
                id: id,
            }
        })
    },
}
